resource "aws_vpc" "nx01p" {
  cidr_block = "10.10.0.0/16"
  tags = {
    Name = "nx01p"
    Environment = "prod"
    Owner       = "infra"
  }
}

resource "aws_subnet" "public-1a" {
  vpc_id     = aws_vpc.nx01p.id
  cidr_block = "10.10.0.0/24"
  availability_zone = "cn-northwest-1a"
  tags = {
    Name = "public-1a"
    Environment = "prod"
    Owner       = "infra"
  }
}
resource "aws_subnet" "public-1b" {
  vpc_id     = aws_vpc.nx01p.id
  cidr_block = "10.10.1.0/24"
  availability_zone = "cn-northwest-1b"
  tags = {
    Name = "public-1b"
    Environment = "prod"
    Owner       = "infra"
  }
}
resource "aws_subnet" "public-1c" {
  vpc_id     = aws_vpc.nx01p.id
  cidr_block = "10.10.2.0/24"
  availability_zone = "cn-northwest-1c"
  tags = {
    Name = "public-1c"
    Environment = "prod"
    Owner       = "infra"
  }
}

resource "aws_subnet" "private-1a" {
  vpc_id     = aws_vpc.nx01p.id
  cidr_block = "10.10.3.0/24"
  availability_zone = "cn-northwest-1a"
  tags = {
    Name = "private-1a"
    Environment = "prod"
    Owner       = "infra"
  }
}
resource "aws_subnet" "private-1b" {
  vpc_id     = aws_vpc.nx01p.id
  cidr_block = "10.10.4.0/24"
  availability_zone = "cn-northwest-1b"
  tags = {
    Name = "private-1b"
    Environment = "prod"
    Owner       = "infra"
  }
}
resource "aws_subnet" "private-1c" {
  vpc_id     = aws_vpc.nx01p.id
  cidr_block = "10.10.5.0/24"
  availability_zone = "cn-northwest-1c"
  tags = {
    Name = "private-1c"
    Environment = "prod"
    Owner       = "infra"
  }
}

resource "aws_subnet" "database-1a" {
  vpc_id     = aws_vpc.nx01p.id
  cidr_block = "10.10.100.0/24"
  availability_zone = "cn-northwest-1a"
  tags = {
    Name = "database-1a"
    Environment = "prod"
    Owner       = "infra"
  }
}
resource "aws_subnet" "database-1b" {
  vpc_id     = aws_vpc.nx01p.id
  cidr_block = "10.10.101.0/24"
  availability_zone = "cn-northwest-1b"
  tags = {
    Name = "database-1b"
    Environment = "prod"
    Owner       = "infra"
  }
}
resource "aws_subnet" "database-1c" {
  vpc_id     = aws_vpc.nx01p.id
  cidr_block = "10.10.102.0/24"
  availability_zone = "cn-northwest-1c"
  tags = {
    Name = "database-1c"
    Environment = "prod"
    Owner       = "infra"
  }
}
